#include "strategy.h"

int SpecialK::calculate_tree(Graph *g)
{
	std::cout << "Kruskal is about to run!!\n";
	std::vector <Edge> spanning_tree;
	std::cout << "Spanning Tree Size " << spanning_tree.size() << "\n";	
	kruskal_minimum_spanning_tree(*g, std::back_inserter(spanning_tree));
	std::cout << "Spanning Tree Size " << spanning_tree.size() << "\n";	
	return 1;
}

int HeavyP::calculate_tree(Graph *g)
{
	std::cout << "Prims is about to run!!\n";
	std::vector <Edge> spanning_tree;
	//std::cout << "Spanning Tree Size " << boost::num_vertices(*g) << "\n";	
	//std::cout << "Spanning Tree Size " << p.size() << "\n";	
	std::vector < graph_traits < Graph >::vertex_descriptor > p(num_vertices(*g));
	//std::cout << "Spanning Tree Size " << p.size() << "\n";	
	prim_minimum_spanning_tree(*g,&p[0]);
	std::cout << "Spanning Tree Size " << p.size() << "\n";	

/*
  for (std::size_t i = 0; i != p.size(); ++i)
    if (p[i] != i)
      std::cout << "parent[" << i << "] = " << p[i] << std::endl;
    else
      std::cout << "parent[" << i << "] = no parent" << std::endl;
*/
	return 2;
}


